<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<script src="/resources/js/calendarLocale.js"></script>
	<style>
body {
	zoom: 89%;
}
</style>
</h:head>
<h:body>
	<h:form id="form">
		<p:growl id="msgs" showDetail="true" />
		<p:toolbar>
			<f:facet name="right">
				<p:outputLabel for="popup1" value="时间：" />
				<p:calendar id="popup1" navigator="true" value="#{operationRiskExceedController.queryDate1}"
					 maxdate="Date()" pattern="yyyy-MM-dd" >
				</p:calendar>
				<p:outputLabel for="popup2" value="至 " style="margin-right:3px;"/>
				<p:calendar id="popup2" navigator="true" value="#{operationRiskExceedController.queryDate2}"
					 maxdate="Date()" pattern="yyyy-MM-dd" >
				</p:calendar>
				<p:commandButton value="查询" id="query2" update="exceedTable" icon="ui-icon-search"
					actionListener="#{operationRiskExceedController.queryByTime}">
				</p:commandButton>
			</f:facet>
		</p:toolbar>
		<p:remoteCommand name="onCellEdit" update="form:exceedTable form:msgs" />
		<p:dataTable id="exceedTable" var="item" value="#{operationRiskExceedController.exceedList}"
			rowKey="#{item.id}" style="margin-bottom:0" emptyMessage="无记录" rows="20" paginator="true"
			selectionMode="single" selection="#{operationRiskExceedController.select}"
			paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="20,30,50" paginatorPosition="bottom" editable="true" editMode="cell">
			<p:ajax event="rowSelect" listener="#{operationRiskExceedController.onRowSelect}" />
			<p:ajax event="cellEdit" oncomplete="onCellEdit()" update="form:msgs"
				listener="#{operationRiskExceedController.cellEdit}" />
			<p:column width="40" headerText="序号 " style="text-align:center">
				<h:outputText value="#{item.sort}" />
			</p:column>
			<p:column headerText="直调系统">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.directTransferNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.directTransferNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="广东省网">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.guangdongNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.guangdongNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="广西省网">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.guangxiNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.guangxiNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="云南省网">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.yunnanNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.yunnanNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="贵州省网">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.guizhouNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.guizhouNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="湖南省网">
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{item.hunanNum}" />
					</f:facet>
					<f:facet name="input">
						<p:inputText value="#{item.hunanNum}" />
					</f:facet>
				</p:cellEditor>
			</p:column>
			<p:column headerText="总计">
				<p:outputLabel id="summary"
					value="#{item.directTransferNum + item.guangdongNum + item.guangxiNum + item.yunnanNum + item.guizhouNum + item.hunanNum}" />
			</p:column>
		</p:dataTable>
	</h:form>
</h:body>
</html>